Repository navigation
Conversation
Docker supports multiple api versions. So if you want to stick with particular version, you may specify it. You can do this through Docker#api_version= method: ```ruby Docker.api_version = '1.24' ``` - Added ability to specify docker remote api version - Renamed Docker::API_VERSION to Docker::SUPPORTED_API_VERSION - Raise error when specified version is less than supported version - Added specs
|
Seeing as how most of this gem is made to just "work" with any version of the API, it's not that feasible to allow anyone to specify any version. That could really easily result in an extremely poor experience. If we were to make a change to support multiple versions of the API, we'd either need to maintain a compatible version of the gem for each API version, or specify different code paths for each version of the API. It's difficult to do this without releasing a new major version of the gem. Docker has made this increasingly difficult by not doing a good job versioning their API. |
|
Yes, it seems like new major release needed. Also, 1.16 version is pretty old now. Does docker actually support these versions? From this issue I see, that docker team do not support any versions different from the current. But they doing good with backward compatibility last time.
Why not also specify supported versions in the gem? Something similar to what I did in PR @tlunter WDYT about bumping a new release with latest api version supported? Isn't that what gem listed in the official documentation should do? :) What about write down some roadmap? I know, supporting multiple versions is hard, but we have to move on. Thanks! |
|
If I bump the API version listed to the latest, every person that is not using 1.12 is out of luck for any new changes or bug fixes. There are portions of the API that are not fully completed because someone hasn't had need of it. I won't release a major version change with something as simple as letting someone choose there own version. That'll lead to a lot of angry developers because it won't work with their applications like it currently does. |
|
@tlunter Would you be interested in upping to a new major version that supports newer docker commands while keeping versions with the lower version on docker 1.16? |
|
This is a complete blocker for those that need 1.24, eg when connecting to Windows Docker Hosts:
|
Hi,
Right now
Docker::API_VERSIONis hardcoded, so we cannot use the latest features of api.For example, I have docker 1.12.5 installed (with api version 1.24 supported) and I was not able to get containers IPAddress when connected to user-defined docker bridge network.
I figured out that this feature (Show networks settings for each network when inspecting a container) was added in the api version 1.21. But gems code using
1.16version each request.Actually it's not required to explicitly specify version to use. Here is what docker documentation says about using api versions:
Since I would like to use the latest docker api version, I propose this pull request, where user may specify his docker remote api version.
Actually I thought, that it is better to use the latest api version by default (do not explicitly specify any versions), but some tests was failing. So I did not modify default behaviour.